package org.lyc.lanqiao.past;


/**
 * 2023 真题 特殊日期
 *
 * @author Liu Yicong
 * @date 2024/3/27
 */
public class ASpecialDate {
	public static void main(String[] args) {
		long count = 0;
		for (int i = 2000; i < 2000000; i++) {
			boolean specialYear = (i % 4 == 0 && i % 100 != 0) || i % 400 == 0;//闰年
			//月份
			for (int month = 1; month <= 12; month++) {
				int days;
				if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {
					days = 31;
				} else if (month == 4 || month == 6 || month == 9 || month == 11) {
					days = 30;
				} else {
					if (specialYear) {
						days = 29;
					} else {
						days = 28;
					}
				}
				for (int day = 1; day <= days; day++) {
					if (i % month == 0 && i % day == 0) {
						count++;
					}
				}
			}
		}
		System.out.println(count + 1);
	}
}
